/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.coupon.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ykht.proj.common.core.util.R;
import com.ykht.proj.coupon.entity.CnCoupon;
import com.ykht.proj.coupon.entity.CnCouponLog;
import com.ykht.proj.coupon.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 优惠券领取记录表
 *
 * @author proj code generator
 * @date 2020-11-16 17:00:21
 */
@Mapper
public interface CnCouponLogMapper extends BaseMapper<CnCouponLog> {

	List<CnCouponLogVo> findPage(Page page, @Param("map") CnCouponLogVo cnCouponLogVo);

    IPage<CouponLogPagelResp> opPage(Page page,@Param("req")CouponLogPagelReq req);
    CouponLogPagelResp getCouponLogPagelRespById(@Param("req")CouponLogPagelReq req);

    CnCoupon findById(@Param("id") long id);

	List<CouponLogTypeCount> myCouponCount(@Param("personId") Long personId);

	/**
	 * 通过id查询cms资讯表（文章）
	 * @param id
	 * @return
	 */
    FxCmsInfoVO getByIdFxCmsInfoVO(Long id);

	/**
	 * 通过id查询优惠券领取记录表
	 * @param id
	 * @return
	 */
    CnCouponLogVo getByIdCnCouponLog(Long id);



	Page<PaymentVo> getPaymentPage(PaymentVo paymentVo);

	R getePosit(Long sjId);
	R getPayment(Long sjId);

}
